#include <iostream>
#include "compiler.hpp"

void todo_variable(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "DECLARING VARIABLE: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_class(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "CLASS DECLARATION: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_def(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "FUNCTION DECLARATION: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_case(char const* first, char const* last)
{
	//std::string str(first, last);
	
	std::cout << "CASE STATEMENT: " << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_print(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "PRINT STATEMENT: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_break(char const* first, char const* last)
{
	std::cout << "BREAK STATEMENT" << std::endl;
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();	
}

void todo_else(char const* first, char const* last)
{
	std::cout << "ELSE CONDITION" << std::endl;
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();	
}

void todo_if(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "IF CONDITION: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;	

	t.s.clear();
}

void todo_loop(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "LOOP STATEMENT: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;	

	t.s.clear();
}

void todo_return(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "RETURN STATEMENT: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;	

	t.s.clear();
}

void todo_namespace(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "DECLARING NAMESPACE: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;	

	t.s.clear();
}

void todo_assign(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "ASSIGNMENT: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;
	
	t.s.clear();
}

void todo_function(char const* first, char const* last)
{
	std::string str(first, last);
	
	std::cout << "FUNCTION CALL: " << str << std::endl;
	
	for (std::vector<std::string>::iterator it = t.s.begin(); it != t.s.end(); it++) {
		std::cout << "Op: " << *it << std::endl;
	}
	
	for (std::vector<std::string>::iterator it = t.args.begin(); it != t.args.end(); it++) {
		std::cout << "Arg: " << *it << std::endl;
	}
	std::cout << "----------------------" << std::endl;

	t.s.clear();
	t.args.clear();
}
